﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


public partial class Theme_3_UserControls_ResourceClickTaxis : System.Web.UI.UserControl
{
    protected PowerCreator.LMS.Web.Config.WebConfig config = new PowerCreator.LMS.Web.Config.WebConfig();
    PowerCreator.LMS.Web.Course.Resource opResource = new PowerCreator.LMS.Web.Course.Resource();
    protected void Page_Load(object sender, EventArgs e)
    {
        BinderResourceClick();
    }
    private void BinderResourceClick()
    {
        //点击排行
        string search = "ResourseState = 1";
        string orderBy = "ResourceClickNum desc ";
        DataTable dt = opResource.QueryResource(search, orderBy, 8, 1);
        dt.Columns.Add("i");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dt.Rows[i]["i"] = i + 1;
        }
        rpt_ClickCount.DataSource = dt;
        rpt_ClickCount.DataBind();
    }
}
